

import React, { Component } from 'react';
import { inject, observer } from 'mobx-react';
import { toJS } from 'mobx'
import { Popconfirm, Progress, notification, message, Modal, Drawer, Alert, Tabs, Table, Divider, Tag, Timeline, Tree, Statistic, Popove, List, Empty, Descriptions, Calendar, Card, Carousel, Collapse, Tooltip, Comment, Badge, Avatar, TimePicker, Transfer, TreeSelect, Select, Slider, Switch, Radio, Rate, Mentions, InputNumber, Input, Form, DatePicker, Cascader, Checkbox, AutoComplete, Button, Upload, Icon, Spin, Typography, Row, Col, Header, Footer, Sider, Content, Affix, Breadcrumb, Menu, Dropdown, Pagination, PageHeader, Steps } from 'antd'
import moment from 'moment';
import s from '../../assets/less/YunYing/WhetherWarning.less'
import 'moment/locale/zh-cn';
moment.locale('zh-cn');
const { SubMenu } = Menu;
const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
const { Step } = Steps;
const { Title } = Typography;
const { Option } = Mentions;
const { Option1 } = Select;
const { Panel } = Collapse;
const { TabPane } = Tabs;
const { SHOW_PARENT } = TreeSelect;
@inject('YunYingStore')
@observer
export class WhetherWarning extends Component {
    render() {
        let that = this
        return (
            <React.Fragment>
                <div className={`${s.warnPos}`}>开启报警？ <Switch defaultChecked={this.props.YunYingStore.WhetherWarning} onChange={onChange} /></div>
            </React.Fragment >
        );
        function onChange(checked) {
            that.props.YunYingStore.ChangeWhetherWarning(checked)
        }
    }
}
